home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 100 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: nyx10.cs.du.edu!not-for-mail
  2. From: colin@nyx10.cs.du.edu (Colin Plumb)
  3. Newsgroups: comp.std.c
  4. Subject: Re: sizeof(1L) in preprocesor;How to tell sizeof(double)>sizeof(long) ?
  5. Date: 13 Jan 1996 19:55:15 -0700
  6. Organization: University of Denver, Dept. of Math & Comp. Sci.
  7. Message-ID: <4d9raj$q5r@nyx10.cs.du.edu>
  8. References: <sc3f9vb6gk.fsf@lns101.lns.cornell.edu> <tuent98zl4.fsf@nemo.bedford.waii.com> <4ctk66$57j@lyra.csx.cam.ac.uk> <KANZE.96Jan9135752@slsvewt.lts.sel.alcatel.de>
  9. NNTP-Posting-Host: nyx10.cs.du.edu
  10.  
  11. In article <KANZE.96Jan9135752@slsvewt.lts.sel.alcatel.de>,
  12. James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
  13. >In article <4ctk66$57j@lyra.csx.cam.ac.uk> nmm1@cus.cam.ac.uk (Nick
  14. >Maclaren) writes:
  15. >> Don't bother - the 'constants' in <float.h> aren't!  This is a specific
  16. >> exclusion to make life easier for systems with separate floating-point
  17. >> processors, and makes <float.h> almost useless for numerical analysts.
  18. >
  19. > Is this true for all of the ``constants'' in float.h, or only some of
  20. > them?  I don't have my C standard here to check, but I thought that
  21. > this was only true of the constants whose type was non-integral.
  22.  
  23. ANSI section 2.2.4.2.2 "Characteristics of floating types <float.h>"
  24.  
  25. #   Of the values in the <float.h> header, FLT_RADIX shall be a constant
  26. # expression suitable for use in #if preprocessing directives; all other
  27. # values need not be constant expressions.
  28.  
  29. Yup, that's annoying.  I can't even determine if "long double" has
  30. more precision at compile time with "#if LDBL_MANT_DIG > DBL_MANT_DIG".
  31. -- 
  32.     -Colin
  33.